#include<logger.h>
#include<gflags/gflags.h>

DEFINE_bool(log_async,true,"log async enable");
DEFINE_int32(log_level,1,"log level bebug");
DEFINE_string(log_pattern,"[%H:%M:%S][%l]%v","log format");
DEFINE_string(log_path,"stdout","log path");


int main(int argc ,char* argv[]){
    google::ParseCommandLineFlags(&argc,&argv,true);
    lyhlog::log_settings settings={
        .async=FLAGS_log_async,
        .level=FLAGS_log_level,
        .pattern=FLAGS_log_pattern,
        .path=FLAGS_log_path
    };

    // init logger
    lyhlog::log_init(settings);

    DEBUG("hello {} ","linux");

    return 0;
}